<template>
    <div class="box">
            <!-- 题目框 -->
            <label>{{wholeTitles.title.titNum}}::{{wholeTitles.title.content}}</label>
            
            <!-- 是否必做 -->
            <label>({{wholeTitles.title.must==1?'必做':'非必做'}})</label>

        <!--在编辑题目阶段，checklist其实并没有用  -->
        <el-checkbox-group v-model="checkList" @change="change">
              <!-- 循环获取每一个选项 -->
            <div v-for="(item,index) in wholeTitles.choices" :key="index">
                <el-checkbox :label=wholeTitles.choices[index].content >{{index+1}}:
                   {{wholeTitles.choices[index].content}}
                </el-checkbox> 
            </div>    
        </el-checkbox-group>
          <!-- <button @click="con()">打印</button> -->
        <el-button @click="log()" v-show="false">打印</el-button>
        <br/>
    </div>
</template>

<script>
//思路大概就是，将每个选项的内容和一个输入框绑定起来，达到可编辑效果；
  export default {
    props: {
        wholeTitles:{}
    },
    data () {
      return {
        checkList: [],
        count: 4,       //代表添加下一个时的数量

             mustdo:[{
                value: 1,                                   //1:必做
                label: '必做'                               //2：非比做
            },{
                value: 2,                               
                label:'非比做'
            }], 
            details:{
                num:11,
                detContent:''
            }          
      };
    },
    methods: {
      change(items){
          //console.log(items);

          this.details.detContent=items.join(';');
          this.details.num=this.wholeTitles.title.titNum;
          console.log( this.details.detContent);
      },
        log(){
            console.log(this.checkList);
           
        },
        del(){

        },
        add(count){

        }
    }
  };
</script>
<style  scoped>
.inputboxClass{
    width: 300px;

}


</style>
